<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>修改资料</title>
    <meta name="viewport" content="initial-scale=1, maximum-scale=1">
    <link rel="shortcut icon" href="/favicon.ico">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="stylesheet" type="text/css" href="/css/personList.css">
    <link rel="stylesheet" href="http://g.alicdn.com/msui/sm/0.6.2/css/sm.min.css">
    <link rel="stylesheet" href="http://g.alicdn.com/msui/sm/0.6.2/css/sm-extend.min.css">
    <link rel="stylesheet" href="http://g.alicdn.com/msui/sm/0.6.2/css/??sm.min.css,sm-extend.min.css">
</head>
<style type="text/css">
    .infinite-scroll-preloader {
        margin-top: -20px;
    }

    .swiper-slide img {
        width: 100%;
    }
</style>


<body>
    <!--信息页-->
    <div class="page">
        <!--头部导航-->
        <header class="bar bar-nav">
            <a class="icon icon-left pull-left" href="/admin/personal"></a>
            <!--        <a class="icon icon-refresh pull-right"></a>-->
            <h1 class="title">商家注册</h1>
        </header>
        <!--底部导航-->
        <%- include ("../common/publicnav.ejs")%>

        <!--主体部分-->
        <div class="content native-scroll">
            <div class="content">
                <div class="list-block">
                    <ul>

                        <!--店铺名称-->
                        <li>
                            <div class="item-content">
                                <div class="item-media"><i class="icon icon-form-name"></i></div>
                                <div class="item-inner">
                                    <div class="item-title label">店铺名称</div>
                                    <div class="item-input">
                                        <input id="nickname" type="text" placeholder="店铺名称">
                                    </div>
                                </div>
                            </div>
                        </li>
                        <!--联系电话-->
                        <li>
                            <div class="item-content">
                                <div class="item-media"><i class="icon icon-form-password"></i></div>
                                <div class="item-inner">
                                    <div class="item-title label">联系电话</div>
                                    <div class="item-input">
                                        <input id="password" type="number" placeholder="联系电话" class="">
                                    </div>
                                </div>
                            </div>
                        </li>
                        <li>
                            <div class="item-content personalPic">
                                <div class="item-media"><i class="icon icon-form-name"></i></div>
                                <div class="item-inner">
                                    <div class="item-title label">营业执照</div>
                                    <div class="item-input">
                                        <div class="addPic">
                                            <div class="addInput">
                                                <input type="file" id="file" class="headFile" onchange="headFile()">
                                            </div>
                                            <div class="addShow">
                                                <div class="addPhoto headPic">+</div>
                                                <img src="/images/pic.jpg" class="addImg"/>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </li>

                        <!--店铺地址-->
                        <li class="align-top">
                            <div class="item-content">
                                <div class="item-media"><i class="icon icon-form-comment"></i></div>
                                <div class="item-inner">
                                    <div class="item-title label">店铺地址</div>
                                    <div class="item-input">
                                        <textarea id="personInformation"></textarea>
                                    </div>
                                </div>
                            </div>
                        </li>
                    </ul>
                </div>
                <div class="content-block">
                    <div class="row">
                        <div class="col-50"><a href="#" class="button button-big button-fill button-danger">取消</a></div>
                        <div class="col-50"><a onclick="submit()"
                                class="button button-big button-fill button-success">提交</a></div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script type='text/javascript' src='http://g.alicdn.com/sj/lib/zepto/zepto.min.js' charset='utf-8'></script>
    <script type='text/javascript' src='http://g.alicdn.com/msui/sm/0.6.2/js/sm.min.js' charset='utf-8'></script>
    <script type='text/javascript' src='http://g.alicdn.com/msui/sm/0.6.2/js/sm-extend.min.js' charset='utf-8'></script>
    <script type='text/javascript' src='http://g.alicdn.com/msui/sm/0.6.2/js/??sm.min.js,sm-extend.min.js'
        charset='utf-8'></script>
    <script src="https://cdn.staticfile.org/jquery/2.0.0/jquery.min.js"></script>
    <script>
        $(document).ready(function () {
            $(".addPhoto").click(function () {
                $('[type=file]').eq(0).click();
            });
        })

        $.init()

        // 修改头像
        function headFile() {
            var preview = document.getElementsByClassName("addImg")[0];
            var file = document.getElementsByClassName("headFile")[0].files[0];
            // alert(file);
            var reader = new FileReader();
            reader.addEventListener("load", function () {
                preview.src = reader.result;
            }, false);
            if (file) {
                reader.readAsDataURL(file);
            }
            var headFile = document.getElementsByClassName('headFile')[0].files[0];
            var formData = new FormData();
            formData.append("file", headFile);

        }


        function submit() {
            $.showPreloader('提交审核')
            setTimeout(function () {
                $.hidePreloader();
            }, 2000);
            
        }
    </script>
</body>

</html>